Connecting to the CSUSB JupyterHub Server
Updated: 10-05-2022
This instruction is for those who want to their local VS-Code to (remotely) use the CSUSB JupyterHub server. This is different from running a Jupyter stack that contains VS Code.
This instruction is based on https://blog.jupyter.org/connect-to-a-jupyterhub-from-visual-studio-code-ed7ed3a31bcb.
Required items
We need to the followings.
(Server) A running container.
(Server) A valid token, see below.
(Local) VS-code with the
Jupyter
extension installed.
For item 1, see xxx, and for item 3, see xxx.
Below, we will explain how to generate a token and how to connect to the CSUSB JupyterHub using the token.
Generate a JupyterLab Token
Connect to a remote server
Open your VS-Code.
Open an ipynb file.
Use
!hostname
to check your current kernel. Currently, it is local.Open the palette and type
Jupyter:
; see how to here https://docs.github.com/en/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces.Choose
Jupyter: Specify Jupyter Server for Connections
.Choose
Existing
Type the following in the box
https://csusb-jupyter.nrp-nautilus.io/user/<your email address>?token=<your token>
.Note
For the first type of the URI, you can copy it from CSUSB JupyterHub. In your server, click the URL box and copy the necessary part.
Lastly, run
!hostname
to check the current kernel. If it is still connected to the last one, see the following images.